package org.spdata.tsdb.dao;

import java.util.List;
import java.util.Map;

import org.spdata.tsdb.client.DownSample;
import org.spdata.tsdb.client.SubQuery;
import org.spdata.tsdb.entity.DpsPack;
import org.spdata.tsdb.entity.Metric;


public interface DpsDAO extends BaseDAO<DpsPack> {
	/**
	 * 根据测点id查询时间范围内的dpsPack ，如果采样频率以Hour或者day为单位，则只返回summary字段，否则返回dps字段
	 * @param metricId
	 * @param startSecond
	 * @param endSecond
	 * @param sample
	 * @return
	 */
	public List<DpsPack> findDPS(Integer metricId, Long startSecond, Long endSecond,DownSample sample);

	/**
	 * 根据SubQuery查询dpsPack
	 * @param query
	 * @param startSecond
	 * @param endSecond
	 * @param sample
	 * @return
	 */
	public Map<Metric,List<DpsPack>> findDPS(SubQuery query,Long startSecond,Long endSecond,DownSample sample);
}
